#include "TollgateStory.h" 
#include "cocostudio\CocoStudio.h"
#include "TollgateScene.h"

Scene* TollgateStory::createScene(){
	auto scene = Scene::create();

	auto layer = TollgateStory::create();

	scene->addChild(layer);

	return scene;
}

bool TollgateStory::init(){
	if (!Layer::init()){
		return false;
	}
	
	auto node = CSLoader::createNode("StoryScene.csb");
	this->addChild(node);

	this->schedule(schedule_selector(TollgateStory::changeScene), 6.0f);
	return true;
}

void TollgateStory::changeScene(float dt){
	Director::getInstance()->replaceScene(TollgateScene::createScene(1));
}